const elsePicMW = require('express').Router()
elsePicMW.route('/wx')
    .post(async (req, res, next) => {
        if (req.jsonData.MsgType[0] == 'image') {
            const { jsonData } = req
            const msg = '已经上传了图片'
            const xmlSendData = require('../../../tools/sendMsg')(jsonData.FromUserName[0], jsonData.ToUserName[0], msg)

            res.end(xmlSendData)

        } else next()
    })
module.exports = elsePicMW